
if get_option('enable_tests')
  tests = [
    'addr_interval',
    'analysis_block',
    'analysis_cc',
    'analysis_function',
    'analysis_hints',
    'analysis_types',
    'analysis_meta',
    'analysis_var',
    'analysis_xrefs',
    'analysis_class_graph',
    'annotated_code',
    'autocmplt',
    'base64',
    'bin',
    'binheap',
    'bitmap',
    'buf',
    'ovf',
    'cmd',
    'core_cmd',
    'rzpipe',
    'cons',
    'contrbtree',
    'debruijn',
    'debug_session',
    'diff',
    'dwarf',
    'dwarf_info',
    'dwarf_integration',
    'esil_dfg_filter',
    'event',
    'file',
    'flags',
    'glob',
    'graph',
    'hex',
    'intervaltree',
    'io',
    'json',
    'list',
    'parse_ctype',
    'pdb',
    'pj',
    'queue',
    'rz_test',
    'rbtree',
    'serialize_analysis',
    'serialize_config',
    'serialize_flag',
    'serialize_spaces',
    'sign',
    'skiplist',
    'spaces',
    'sparse',
    'stack',
    'str',
    'strbuf',
    'table',
    'tree',
    'uleb128',
    'unum',
    'util',
    'vector',
    'skyline',
    'big',
    'idpool',
    'idstorage'
  ]

  foreach test : tests
    exe = executable('test_@0@'.format(test), 'test_@0@.c'.format(test),
      include_directories: [platform_inc],
      dependencies: [
        rz_util_dep,
        rz_main_dep,
        rz_socket_dep,
        rz_core_dep,
        rz_io_dep,
        rz_bin_dep,
        rz_flag_dep,
        rz_cons_dep,
        rz_asm_dep,
        rz_debug_dep,
        rz_config_dep,
        rz_bp_dep,
        rz_reg_dep,
        rz_syscall_dep,
        rz_analysis_dep,
        rz_parse_dep,
        rz_egg_dep,
        rz_search_dep,
        rz_hash_dep,
        rz_crypto_dep,
        rz_magic_dep,
        lrt,
      ],
      install: false,
      install_rpath: rpath_exe,
      implicit_include_directories: false
    )
    test(test, exe, workdir: join_paths(meson.current_source_dir(), '..'))
  endforeach
endif
